Title: SQL W3S (By-BKK) / 027 Left Join
Tags: Obsidian_to_Anki

Q: What does the SQL LEFT JOIN keyword do?
A: Returns all records from the left table and matching records from the right table

Q: True or False: LEFT JOIN will return all records from the left table, even if there are no matches in the right table
A: True

Q: What is another name for LEFT JOIN in some databases?
A: LEFT OUTER JOIN

Q: Write the SQL syntax for a LEFT JOIN
A: SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name = table2.column_name

Q: LEFT JOIN returns 0 records from the right table if there is no match.
A: What happens when there is no match for a row in the right table using LEFT JOIN?

Q: What does the following query do?
SELECT Customers.CustomerName, Orders.OrderID FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID ORDER BY Customers.CustomerName;
A: It selects all customers and any orders they might have

Q: LEFT JOIN returns only matching records from both tables.
A: False

Q: In SQL, which table do all records come from in a LEFT JOIN?
A: The left table (first table in the join)

Q: LEFT JOIN vs RIGHT JOIN: Which returns all records from the left table?
A: LEFT JOIN

Q: LEFT OUTER JOIN
What is another term for LEFT JOIN?
A: If you want to include all customers and any sales orders they have, which JOIN should you use? #flashcard
LEFT JOIN

Q: LEFT JOIN can be used to find records in one table that have no match in another table.
A: True